package com.wsd.jing.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wsd.jing.entity.Department;
import com.wsd.jing.vo.DepartmentVO;
import com.wsd.jing.request.CommonRequest;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * All rights Reserved, Designed By www.tom.com
 *
 * @author tom
 * @version 1.0.0
 * @projectName: jing
 * @packageName: com.wsd.jing.service
 * @className: IDepartmentService
 * @description: 部门服务类
 * @createDate 2022-11-20 07:41
 * @copyright 2022-11-20 07:41 www.tom.com Inc. All rights reserved.
 */
public interface IDepartmentService extends IService<Department> {

    /**
     * @param department:部门
     * @return Boolean
     * @author tom
     * @description 新增部门
     * @createDate 2022-11-20 07:41
     */
    Boolean insertDepartment(Department department);

    /**
     * @param department:部门
     * @return Boolean
     * @author tom
     * @description 修改部门
     * @createDate 2022-11-20 07:41
     */
    Boolean updateDepartment(Department department);

    /**
     * @param id:id
     * @return Boolean
     * @author tom
     * @description 删除部门
     * @createDate 2022-11-20 07:41
     */
    Boolean deleteDepartment(Integer id);

    /**
     * @param ids:id
     * @return Boolean
     * @author tom
     * @description 批量删除部门
     * @createDate 2022-11-20 07:41
     */
    Boolean deleteDepartments(String ids);

    /**
     * @param id:id
     * @return Department
     * @author tom
     * @description 查询部门
     * @createDate 2022-11-20 07:41
     */
    Department getDepartment(Integer id);

    /**
     * @param commonRequest:排序参数
     * @param department:部门
     * @return List<Department>
     * @author tom
     * @description 查询部门列表
     * @createDate 2022-11-20 07:41
     */
    List<Department> listDepartments(CommonRequest commonRequest, Department department);

    /**
     * @param commonRequest:分页参数
     * @param department:部门
     * @return Map<String, Object>
     * @author tom
     * @description 分页查询部门列表
     * @createDate 2022-11-20 07:41
     */
    Map<String, Object> listPageDepartments(CommonRequest commonRequest, Department department);

    /**
     * @param :
     * @return List<DepartmentDTO>
     * @author tom
     * @description 查询部门树
     * @createDate 2022/11/23 18:15
     */
    List<DepartmentVO> listTreeDepartments();

    /**
     * @param id:本部门ID
     * @return Set<String>
     * @author tom
     * @description 查询本部门及下级部门ID
     * @createDate 2024/6/13 18:13
     */
    Set<String> listTreeDepartmentIds(Integer id);
}
